<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ page import="com.luzhikun.jsptest.myjsp.Students" %><%--
  Created by IntelliJ IDEA.
  User: 小柒的Java
  Date: 2021/4/27
  Time: 13:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>查询学生</title>
</head>
<body>
<%
    //获取传过来的学生集合
    List<Students> students = (List<Students>) request.getAttribute("students");
    //对这个集合进行遍历
    Iterator iterator = students.iterator();
    while (iterator.hasNext()) {
        Object next = iterator.next();
%>
<%= next.toString() %>
<%
    }
%>
</body>
</html>
